<template>
  <div class="chart-container">
    <el-row :span="6">
      <span class="demonstration">日期</span>
      <el-date-picker
        v-model="listQuery.date"
        type="datetime"
        value-format="yyyy-MM-dd"
        placeholder="选择日期"
      />
      <span class="demonstration">站点</span>
      <el-input v-model="listQuery.station" type="text" placeholder="请输入站点" style="width: 100px;" />
      <el-button type="primary" @click="sendData2Predict">
        确认
      </el-button>
    </el-row>
    <chart height="93%" width="100%" />
  </div>
</template>

<script>
import Chart from '@/views/dashboard/admin/components/PredictByStation'
import send from '@/utils/send'
import { format2Date } from '@/utils'

export default {
  name: 'PredictByStation',
  components: { Chart },
  data() {
    return {
      listQuery: {
        station: '1',
        date: format2Date(new Date(), 'yyyy-MM-dd')
      }
    }
  },
  methods: {
    sendData2Predict() {
      send.$emit('sendPredict', this.listQuery)
      // send.$emit('sendPredictStation', this.station)
    }
  }
}
</script>

<style scoped>
.chart-container{
  position: relative;
  width: 100%;
  height: calc(100vh - 84px);
}
</style>
